// 监听页面的刷新、关闭和跳转
window.addEventListener("beforeunload", function (e) {
    console.log("触发 beforeunload")
})

window.addEventListener("error", function (err) {
    console.log("记录错误信息：" + err.message)
})
